import torch

x = torch.tensor([2.], requires_grad=True)
y = torch.tensor([5.], requires_grad=True)
z = torch.log(x) + y**2
z.backward()
print("x.grad = ", x.grad)
print("y.grad = ", y.grad)
